package com.fisherman.tx;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import java.util.UUID;

/**
 * @User: fisherman
 * @Date: 2020/5/27 10:28
 */

@Repository
public class UserDao {

    private JdbcTemplate jdbcTemplate;
    public void insert(){
        String sql = "INSERT INTO `exercise`.`seat` (`id`, `student`) VALUES (?, ?)";
        String id = UUID.randomUUID().toString().substring(7, 9);
        jdbcTemplate.update(sql,id,12);
    }

}
